<template>
  <!-- 注册成功提示 -->
  <div class="doneDiv">
    <div class="successTitle">
      <img src="@/assets/image/register/checkIcon.png">
      <span style="margin-left: 10px">{{ type == 0 ? '您的信息已提交！' : '恭喜您注册成功！' }}</span>
    </div>
    <div style="margin: 20px; font-size: 15px">{{ type == 0 ? '已提交认证，请耐心等待，您可以使用刚才设置的用户名密码登录，查看比对结果。' : '已完成企业认证，并成功创建企业用户。' }}</div>
    <Buttons @toLogin="toLogin" :buttons="buttons"></Buttons>
    <!-- <div class="loginBtn" @click="toLogin()">立即登录</div> -->
  </div>
</template>

<script>
  export default {
    props: {
      type: {
        type: Number,
        default: 0
      },
      value: {
        type: Number,
        default: 1
      }
    },
    data(){
      return {
        buttons:[{text:"立即登录",type:"success",size:"l",method:"toLogin"}],
      }
    },
    methods: {
			/**
			 * 跳转登录页
			 */
			toLogin: function () {
				let ns = this
				ns.$router.replace({path: 'login'})
        this.$emit('input', this.value - 2)
			}
    }
  }
</script>

<style lang="scss" scoped>
.doneDiv {
  margin-top: 100px;
  margin-bottom: 200px;
  .successTitle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 25px;
  }
  .loginBtn {
    background-color: #045db9;
    color: #f1f2f4;
    padding: 10px 10px;
    width: 100px;
    margin: 0 auto;
    border-radius: 5px;
    margin-top: 50px;
    &:hover {
      cursor: pointer;
      box-shadow: 0px 0px 5px #888888;
      transition: all 0.2s ease 0s;
    }
  }
}
</style>